{layout name="common/layout" /}
{css href="__PUBLIC__/admin/css/setting.css"}
<section class="panel">
    <header class="panel-heading">
        网站基本设置(<a href="javascript:void(0);" style="text-transform: none;" role="copylink" data-link="{php}if(isset($seller_info['seller_url'])&&!empty($seller_info['seller_url'])){ echo $seller_info['seller_url'].'?shop='.$seller_info['seller_id']; }else{ echo config('water_shop').'?shop='.$seller_info['seller_id']; } {/php}">{php}if(isset($seller_info['seller_url'])&&!empty($seller_info['seller_url'])){ echo $seller_info['seller_url'].'?shop='.$seller_info['seller_id']; }else{ echo config('water_shop').'?shop='.$seller_info['seller_id']; } {/php}</a>)
    </header>
    <div class="panel-body">
        <ul class="nav nav-tabs nav-justified" role="tablist" id="setTab">
            <li role="presentation" class="active"><a href="#webInfo" role="tab" data-toggle="tab">网站基本信息</a></li>
            <li role="presentation"><a href="#userInfo" role="tab" data-toggle="tab">帐号基本信息</a></li>
        </ul>
        <form class="form-horizontal" method="post">
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane active" id="webInfo">
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">商城名称</label>
                        <div class="col-lg-10">
                            <input type="text" name="seller_name" class="form-control" value="{$seller_info['seller_name']}" >
                            <p class="help-block">如:拼图云商城</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">商城域名</label>
                        <div class="col-lg-10">
                            <input type="text" name="seller_url"  class="form-control" value="{$seller_info['seller_url']}" >
                            <p class="help-block">如：www.xxx.com(无需加http://或者https://),填写后可直接使用域名访问商城,但需要将服务器域名指向到我们的服务器,如有疑问,请联系客服。</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">商城微信公众平台名称</label>
                        <div class="col-lg-10">
                            <input type="text" name="wechat_name"  class="form-control" value="{php}if(isset($seller_set['wechat_name'])){echo $seller_set['wechat_name'];}{/php}" >
                            <p class="help-block">微信公众号左侧菜单:设置->公众号设置(非公众号帐号)</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">商城微信公众平台帐号</label>
                        <div class="col-lg-10">
                            <input type="text" name="wechat_account"  class="form-control" value="{php}if(isset($seller_set['wechat_account'])){echo $seller_set['wechat_account'];}{/php}" >
                            <p class="help-block">微信公众号左侧菜单:设置->公众号设置(非公众号名称)(配置后将自动跳转到微信授权端)</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">公众平台二维码</label>
                            {php}
                                if(isset($seller_set['wechat_account'])&&!empty($seller_set['wechat_account'])){
                                    echo '<div class="col-lg-2"><img data-title="<p class=\'text-center\' style=\' margin:0px;\'><span class=\'fa fa-qrcode\'></span> 二维码</p>" data-content="<img src=\'http://open.weixin.qq.com/qr/code/?username='.$seller_set['wechat_account'].'\' width=\'150px\'>" role="pop"  src="http://open.weixin.qq.com/qr/code/?username='.$seller_set['wechat_account'].'" width="80px" height="80px"></div>';
                                }else{
                                    echo '<div class="col-lg-10"><p class="help-block">填写公众号帐号以后，自动获取二维码</p></div>';
                                }
                            {/php}
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">微信AppID</label>
                        <div class="col-lg-10">
                            <input type="text" name="appid"  class="form-control" value="{php}if(isset($seller_set['appid'])){echo $seller_set['appid'];}{/php}">
                            <p class="help-block">微信公众号左侧菜单:开发->基本配置</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">微信AppSecret</label>
                        <div class="col-lg-10">
                            <input type="text" name="appsecret"  class="form-control" value="{php}if(isset($seller_set['appsecret'])){echo $seller_set['appsecret'];}{/php}">
                            <p class="help-block">微信公众号左侧菜单:开发->基本配置</p>
                        </div>
                    </div>
                </div>
                <div role="tabpanel" class="tab-pane" id="userInfo">
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">姓名</label>
                        <div class="col-lg-10">
                            <input type="text" name="seller_truename"  class="form-control" value="{$seller_info['seller_truename']}" >
                            <p class="help-block">如:王**</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">头像</label>
                        {:tplSingleImage('headimg')}
                        <div class="row">
                            {php}
                            if(!empty($seller_info['seller_avatar'])){
                            {/php}
                                <div class="col-lg-1 col-sm-1 water-up-2">
                                    <input type="hidden" name="headimg" value="{$seller_info['seller_avatar']}">
                                    <img src="{$seller_info['seller_avatar']}" width="70px" height="70px">
                                    <a class="badge img-badge" onclick="water_delete_up_img(this);">
                                        <span class="fa fa-times"></span>
                                    </a>
                                </div>
                            {php}
                                }
                            {/php}
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">公司名称</label>
                        <div class="col-lg-10">
                            <input type="text" name="seller_company"  class="form-control" value="{$seller_info['seller_company']}">
                            <p class="help-block">如：某某有限责任公司(个人则写个体)</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">公司邮箱</label>
                        <div class="col-lg-10">
                            <input type="email" name="seller_email"  class="form-control" value="{$seller_info['seller_email']}">
                            <p class="help-block">如：****@##.com</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">公司地区</label>
                        <div class="col-lg-10">
                            <div class="row">
                                <div class="col-xs-2">
                                    <select class="form-control" name="s_province" id="s_province" >
                                    </select>
                                </div>
                                <div class="col-xs-2">
                                    <select class="form-control" name="s_city" id="s_city" >
                                    </select>
                                </div>
                                <div class="col-xs-2">
                                    <select class="form-control" name="s_county" id="s_county" >
                                    </select>
                                </div>
                                <div class="col-xs-3">
                                    <span class="form-control " style="border: none; color: #428bca;" id="area_show">{$seller_info['seller_area']}</span>
                                    <input type="hidden" name="seller_area" value="{$seller_info['seller_area']}">
                                </div>
                            </div>
                            <p class="help-block">如：山东省，青岛市</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label">公司地址</label>
                        <div class="col-lg-10">
                            <input type="text" name="seller_address"  class="form-control" value="{$seller_info['seller_address']}">
                            <p class="help-block">如：**市**街道**号**大厦</p>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-lg-offset-2 col-lg-10">
                        <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                </div>
            </div>
        </form>
    </div>

</section>
{js href="__PUBLIC__/admin/js/setting.js,__PUBLIC__/js/area.js"}
<script type="text/javascript">
    $(document).ready(function () {
        //地区插件
        _init_area();
        $('#s_county').change(function () {
            var province = $('#s_province').val();
            var city = $('#s_city').val();
            var county = $('#s_county').val();
            $('#area_show').html(province+city+county);
            $('input[name="seller_area"]').val(province+city+county);
        });
    });
    function daochu() {
        window.location = '{:WebUrl('admin/getExcel')}';
    }

</script>